import request from '@/utils/request'

export const getDepartment = () => {
  return request({ url: '/company/department' })
}

export const getManagerList = () => {
  return request({ url: '/sys/user/simple' })
}

export const addDepartment = (data) => {
  return request({ url: '/company/department', method: 'POST', data })
}

export const getDepartmentDetail = (id) => {
  return request({ url: `/company/department/${id}` })
}

export const updateDepartment = (data) => {
  return request({ url: `/company/department/${data.id}`, method: 'PUT', data })
}

export const delDepartment = (id) => {
  return request({ url: `/company/department/${id}`, method: 'DELETE' })
}
